<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico"/>
<title>DynamoRIO API: _module_data_t Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">DynamoRIO API
   </div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('struct__module__data__t.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-attribs">Data Fields</a>  </div>
  <div class="headertitle">
<div class="title">_module_data_t Struct Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;dr_tools.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pub-attribs"></a>
Data Fields</h2></td></tr>
<tr class="memitem:a0d5b87592e96d3e4c26acd3e8dc1e797"><td class="memItemLeft" align="right" valign="top">app_pc&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct__module__data__t.html#a0d5b87592e96d3e4c26acd3e8dc1e797">end</a></td></tr>
<tr class="memitem:ab2b5d31d865ee49c647eb74a57ef91e1"><td class="memItemLeft" align="right" valign="top">app_pc&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct__module__data__t.html#ab2b5d31d865ee49c647eb74a57ef91e1">entry_point</a></td></tr>
<tr class="memitem:a61acce3537d7cf01edeb2b95e5bfea9c"><td class="memItemLeft" align="right" valign="top">uint&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct__module__data__t.html#a61acce3537d7cf01edeb2b95e5bfea9c">flags</a></td></tr>
<tr class="memitem:a7c45d3b8fe564ddc1cda9239734e0ca8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="dr__tools_8h.html#a8d2fef062beef2b521283369e0108282">module_names_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct__module__data__t.html#a7c45d3b8fe564ddc1cda9239734e0ca8">names</a></td></tr>
<tr class="memitem:a2b9afeada2f79aad9eac4d470fedbb52"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct__module__data__t.html#a2b9afeada2f79aad9eac4d470fedbb52">full_path</a></td></tr>
<tr class="memitem:a3283b796e01a7ca18d60363d02ee2185"><td class="memItemLeft" align="right" valign="top"><a class="el" href="dr__tools_8h.html#aee552e6017b95b4708435b9467223d98">version_number_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct__module__data__t.html#a3283b796e01a7ca18d60363d02ee2185">file_version</a></td></tr>
<tr class="memitem:aca53ed495e74fa4852f81ab8717cad1d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="dr__tools_8h.html#aee552e6017b95b4708435b9467223d98">version_number_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct__module__data__t.html#aca53ed495e74fa4852f81ab8717cad1d">product_version</a></td></tr>
<tr class="memitem:a96289f78358a7cc09b3ef05b4af7f132"><td class="memItemLeft" align="right" valign="top">uint&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct__module__data__t.html#a96289f78358a7cc09b3ef05b4af7f132">checksum</a></td></tr>
<tr class="memitem:a5d6a0611178815d6809fbb02e9b32ecd"><td class="memItemLeft" align="right" valign="top">uint&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct__module__data__t.html#a5d6a0611178815d6809fbb02e9b32ecd">timestamp</a></td></tr>
<tr class="memitem:a94f5d480b14a8c39aee1498f636dc912"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct__module__data__t.html#a94f5d480b14a8c39aee1498f636dc912">module_internal_size</a></td></tr>
<tr class="memitem:aac28072fa786f69d70339d842052c9cf"><td class="memItemLeft" align="right" valign="top">app_pc&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct__module__data__t.html#aac28072fa786f69d70339d842052c9cf">start</a></td></tr>
<tr class="memitem:af9bae197c9afb2fe07ffa4e0af175c60"><td class="memItemLeft" align="right" valign="top">module_handle_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct__module__data__t.html#af9bae197c9afb2fe07ffa4e0af175c60">handle</a></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Holds information about a loaded module. </p>
<dl class="section note"><dt>Note:</dt><dd>On Linux the start address can be cast to an Elf32_Ehdr or Elf64_Ehdr. </dd>
<dd>
On Windows the start address can be cast to an IMAGE_DOS_HEADER for use in finding the IMAGE_NT_HEADER and its OptionalHeader. The OptionalHeader can be used to walk the module sections (among other things). See WINNT.H. </dd>
<dd>
On MacOS the start address can be cast to mach_header or mach_header_64. </dd>
<dd>
When accessing any memory inside the module (including header fields) user is responsible for guarding against corruption and the possibility of the module being unmapped. </dd></dl>
</div><hr/><h2>Field Documentation</h2>
<a class="anchor" id="a96289f78358a7cc09b3ef05b4af7f132"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint _module_data_t::checksum</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>module checksum from the PE headers </p>

</div>
</div>
<a class="anchor" id="a0d5b87592e96d3e4c26acd3e8dc1e797"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">app_pc _module_data_t::end</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Ending address of this module. If the module is not contiguous (which is common on MacOS, and can happen on Linux), this is the highest address of the module, but there can be gaps in between start and end that are either unmapped or that contain other mappings or libraries. Use the segments array to examine each mapped region, and use <a class="el" href="dr__tools_8h.html#a3cac1e57889ba7d16815d8d3b203f256">dr_module_contains_addr()</a> as a convenience routine, rather than checking against [start..end). </p>

</div>
</div>
<a class="anchor" id="ab2b5d31d865ee49c647eb74a57ef91e1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">app_pc _module_data_t::entry_point</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>entry point for this module as specified in the headers </p>

</div>
</div>
<a class="anchor" id="a3283b796e01a7ca18d60363d02ee2185"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="dr__tools_8h.html#aee552e6017b95b4708435b9467223d98">version_number_t</a> _module_data_t::file_version</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>file version number from .rsrc section </p>

</div>
</div>
<a class="anchor" id="a61acce3537d7cf01edeb2b95e5bfea9c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint _module_data_t::flags</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Reserved, set to 0 </p>

</div>
</div>
<a class="anchor" id="a2b9afeada2f79aad9eac4d470fedbb52"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* _module_data_t::full_path</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>full path to the file backing this module </p>

</div>
</div>
<a class="anchor" id="af9bae197c9afb2fe07ffa4e0af175c60"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">module_handle_t _module_data_t::handle</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>module_handle for use with <a class="el" href="dr__tools_8h.html#a8da7923ecc4e020e31442bcc8d9f8d3e">dr_get_proc_address()</a> </p>

</div>
</div>
<a class="anchor" id="a94f5d480b14a8c39aee1498f636dc912"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t _module_data_t::module_internal_size</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>module internal size (from PE headers SizeOfImage) </p>

</div>
</div>
<a class="anchor" id="a7c45d3b8fe564ddc1cda9239734e0ca8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="dr__tools_8h.html#a8d2fef062beef2b521283369e0108282">module_names_t</a> _module_data_t::names</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>struct containing name(s) for this module; use <a class="el" href="dr__tools_8h.html#a082fe71b00688310237fbc2e027c4388">dr_module_preferred_name()</a> to get the preferred name for this module </p>

</div>
</div>
<a class="anchor" id="aca53ed495e74fa4852f81ab8717cad1d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="dr__tools_8h.html#aee552e6017b95b4708435b9467223d98">version_number_t</a> _module_data_t::product_version</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>product version number from .rsrc section </p>

</div>
</div>
<a class="anchor" id="aac28072fa786f69d70339d842052c9cf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">app_pc _module_data_t::start</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>starting address of this module </p>

</div>
</div>
<a class="anchor" id="a5d6a0611178815d6809fbb02e9b32ecd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint _module_data_t::timestamp</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>module timestamp from the PE headers </p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="dr__tools_8h.html">dr_tools.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="struct__module__data__t.html">_module_data_t</a></li>
    <li class="footer" style="float:none;text-align:center"><img border=0 src="favicon.png"> &nbsp;  DynamoRIO API version 5.0.0 --- Wed Sep 10 2014 21:36:44 &nbsp; <img border=0 src="favicon.png">
</small></address>
<!--END !GENERATE_TREEVIEW-->
</body>
</html>
